<?php
require_once 'PHPUnit/Framework.php';
require_once 'config/config.php';
require_once 'TestLib/PDOTestCase.php';

class PDOTest extends PDOTestCase {
	function testNaiveQuery_Select() {
		$rows = $this->db->query('select * from ob1 where num=1');
		foreach ($rows as $row)
			$this->assertTrue(sizeof($row) > 5);
	}
	function testPreparedStatement() {

		$stmt = $this->db->prepare('select * from ob1 where num=?');
		//$stmt->execute();
		$parameters = array (
			1
		);
		$stmt->execute($parameters);
		$row = $stmt->fetch();
		$this->assertTrue(sizeof($row) > 5);
	}
}
?>
